<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>loading</title>
	<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes">
	<script>
		window.addEventListener('touchmove', function (event) { event.preventDefault (); }, {capture: false,passive: false});
		if (typeof window.devicePixelRatio != 'undefined') {
			var meta = document.getElementById ("viewport");
			var scale=2 / window.devicePixelRatio;
			if(window.devicePixelRatio <= 2)
			{
				scale=1 / window.devicePixelRatio;
			}
			meta.setAttribute ('content', 'width=device-width, initial-scale=' +scale + ', user-scalable=no');
		}
	</script>
	<style>
		html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
		#content { background: #000000; width: 100%; height: 100%; }
		.div-c{ position:absolute; left:0px; top:0px; background:#00000000; width:100%; height:100%} 
	</style>
	
</head>
<body>
	<div class="div-c"><canvas id="webgl"></canvas></div> 
	<script type="text/javascript">
		//"lib/howler.min.js","lib/pako.min.js"
		var list=["lib/vconsole.min.js","lib/pako.min.js","lib/howler.min.js","game.js"];
		loadJs('version.js?'+new Date().getTime(),versionSuccess);
		var version=0;
		var trace=console.log;
		function loadJs(url,callback){
			var script=document.createElement('script');
			script.type="text/javascript";
			script.onload=function(){
				callback(true);
			}
			script.onerror=function(){
				callback(false);
			}
			script.src=url;
			document.body.appendChild(script);
		}
		function versionSuccess(ok)
		{
			if(!ok)version=new Date().getTime();
			loadNext(true);
		}
		function loadNext(ok)
		{
			if(list.length<=0)
			{
				list=null;
				init();
			}else
			{
				var path=list.shift();
				loadJs(path+"?"+version,loadNext);
			}
		}
		function init()
		{
			//var vConsole = new VConsole();
			var c=document.getElementById("webgl");
			try{
				lovedna.game.Game.start();
				var game=lovedna.game.Game.current;
				gameInit();
				game.system.setup({canvas:c});
			}catch(e)
			{
				
			}
			
		}
		function gameInit(){
			var str=location.search;
			if(str.indexOf("?")==0)
			{
				
			}else
			{
				
			}
		}
	</script>
</body>
</html>